1. Technical Field
The present invention relates to a computer system having the Industry Standard Architecture (ISA) bus, more particularly, to a computer system with the automatic configuration capability for the ISA cards and with so-called Advanced Power Management by which its power usage is controlled.
2. Related Art
Computer systems may be provided with provisions for adding devices thereto. For example, an ISA (Industry Standard Architecture) type personal computer system may be provided with expansion slots coupled to the ISA system bus for receiving expansion device cards which plug into such expansion slots. Other types of expansion techniques may also be used, such as PCI (Peripheral Component Interconnect) slots, PCMCIA (Personal Computer Memory Card Interface Association) slots, Micro Channel slots, EISA slots, orthelike. Examples of such expansion devices include keyboard controllers, hard drive controllers, floppy drive controllers, video controllers, modems, network cards, add-on memory cards, multimedia cards, sound cards, I/O devices, or the like. An expansion device may comprise one or more logical devices each of which may be assigned system resources such as an I/O address, interrupt level, and DMA channel.
The ISA bus is one of the popular expansion bus standards in the personal computer (PC) industry. The ISA bus requires the allocation of memory and I/O address spaces, DMA channels and interrupt levels among multiple ISA expansion cards. However, ISA does not define a hardware or software mechanism for allocating these resources. Consequently, configuration of ISA cards is typically done with switches or jumpers that change the decode maps for memory and I/O space and steer the DMA and interrupt signals to different pins on the bus. In addition, system configuration files need to be updated to reflect the configuration changes. When more than one expansion card is placed onto an ISA bus, conflicts may arise as a result of the different resource requirements of the expansion cards. To address these potential conflicts, users had to refer to instruction manuals provided by the expansion card manufacturers. From the user's perspective, the configuration process was time consuming and unreliable.
Automated expansion card configuration systems for automatically configuring newly installed expansion cards on standard ISA bus were recently developed. Examples of such configuration systems are disclosed in U.S. Pat. No. 5,517,646 for Expansion Device Configuration System Having Two Configuration Modes Which Uses Automatic Expansion Configutration Sequence During First Mode And Configures The Device Individually During Second Mode issued to Piccirillo et al., U.S. Pat. No. 5,559,965 for Input/Output Adapter Cards Having A Plug And Play Compliant Mode And An Assigned Resources Mode issued to Oztaskin et al., U.S. Pat. No. 5,628,027 for Method Of Determining The Configuration Of Devices Installed On A Computer Bus issued to Belmont, and U.S. Pat. No. 5,634,075 for Baclkward Compatibility For Plug And Play Systems issued to Smith et al. Computer systems that contain a standard bus conforming to the ISA standard may implement a Plug and Play specification, Version 1.0a", May 5, 1994 for automatically configuring Plug and Play expansion cards on the ISA bus without user intervention. The specification, which is incorporated by reference herein, defines a mechanism that provides automatic configuration capability for PnP ISA expansion cards with identification, resource usage determination, conflict detection, and conflict resolution.
In a first kind of PnP compatible ISA PC system, software stored in its ROM BIOS may configure a system after power up to assign system resources such as memory space, I/O addresses, interrupt levels, and DMA channels to each PnP ISA expansion card plugged in the system. The PnP ISA expansion cards built according to the PnP ISA specification may operate in conjunction with such software stored in the BIOS (i.e., PnP BIOS). In such a PC system, when power is applied to the system, PnP expansion cards required for system boot may become active on power up using power-up default system resources. Examples of the devices required for system boot may include hard and floppy disc drive controllers, keyboard controllers, display controllers or the like. Other PnP ISA devices not required for system boot may power up in an inactive state. Examples of PnP devices not required for system boot may include modems, sound cards, or the like. Such devices may not be required for system boot and initial loading of operating system and the like.
Then, the PnP BIOS may isolate each PnP device, assign a handle (i.e., Card Select Number) to each expansion card, and read the resource data from that card. Once each card had been isolated, assigned a handle and read, the PnP BIOS will check for conflict in the devices required for boot, and activate each boot device. The PC system may then boot, for example, from a hard drive and load and execute an operating system (e.g., MS-DOS.RTM., WINDOWS.RTM., OS/2.RTM., UNIX.RTM., or the like). Optionally, the BIOS may configure all other logical devices and configure or leave them in active state.
The operating system may then get PnP information from the ROM BIOS, read resource data from all PnP devices, and arbitrate system resources for all PnP devices. Conflict-free resources may then be assigned for all activated devices and the inactivated devices. Finally, appropriate device drivers may be loaded and thus the system is configured.
In another type of PnP compatible ISA PC system, a PnP compatible operating system (e.g., WINDOWS 95.RTM.) may assign the system resources to PnP ISA devices in the PC system. In such a PC system, the PnP ISA devices required for system boot become active by a ROM BIOS on power up using power up default system resources, while other PnP ISA devices not required for system boot come up inactive on power up. Next, a ROM BIOS of the PC system may be executed and the PC system will boot from its boot devices. Then, the PnP compatible operating system may be loaded. The operating system software is provided with support for PnP devices. In a similar manner to the PnP BIOS, the operating system will isolate each PnP device, assign a handle to each PnP device card, and read the resource data from that card. Once each card had been isolated, assigned a handle and read, the operating system software will arbitrate system resources for all PnP devices. Conflict-free resources may then be assigned and the devices activated. Finally, appropriate device drivers may be loaded and the system is thus configured.
Each above-described PnP software identifies and configures devices using a set of commands executed through three 8-bit I/O ports, that is, ADDRESS port, WRITE.sub.-- DATA port, and READ.sub.-- DATA port. The ADDRESS and WRITE.sub.-- DATA ports are located at fixed addresses. The WRITE.sub.-- DATA port is located at an address alias of the ADDRESS port. The READ.sub.-- DATA port is re-locatable within the I/O range from 0x0203h to 0x03FFh (hexadecimal). This is the only readable auto-configuration port. A special sequence of data writes to one of the ports enables the logic on all the PnP cards in the PC system. This sequence is referred to as the initiation key.
All PnP cards respond to the same I/O port addresses. Consequently, the PnP software needs an isolation mechanism to address one particular card at a time. The isolation protocol uses a unique number built into each card called serial identifier to isolate one PnP card at a time. After isolation, the PnP software assigns each card a unique handle, called the Card Select Number (CSN), which is used to select that PnP card. Using a handle eliminates the need to use a more elaborate and time-consuming isolation protocol in order to select a unique card.
Each card supports a readable data structure that describes the resources supported and those requested by the functions on that card. The data structure supports the concept of multiple functions per ISA card. Each function is defined as a logical device. Plug and Play resource information is provided for each logical device, and each logical device is independently configured through the PnP standard registers of corresponding card. Following isolation, the PnP software reads the resource data structure on each card. When all resource capabilities and demands are known, a resource arbitration process is invoked to determine the resources allocation to each ISA card.
The configuration of ISA cards is performed using the command registers specified for each resource type. However, some ISA functions may not be re-configurable. In these situations, the resources requested will be equivalent to the resources supported. The resource data structure informs the arbiter that it cannot assign these resources to other PnP cards in the PC system. After the assignment of resources, an I/O conflict detection mechanism may be invoked. This mechanism provides a means to insure that I/O resources assigned are not in conflict with standard ISA cards. The command set also supports the ability to activate or deactivate the function(s) on the card. After configuration is completed, PnP cards are removed from configuration mode. The initiation key needs to be re-issued in order to re-enable configuration mode. The details of the Plug and Play logic flow and isolation process will be omitted herein for brevity's sake, and they can be found in the Plug and Play ISA specification.
Meanwhile, a technology closely related to PnP is Power Management. Many PC systems now use some type of power management (often called Advanced Power Management) to temporarily place the computer system in a suspend mode in which power is conserved. In such a system, when it has never been used for a predetermined time, the computer system goes into a suspend mode in which contents of all devices therein are stored in a non-volatile storage such as a hard disk drive and the entire system is substantially turned off for reducing power consumption. In this mode, the contents of all expansion devices are saved indefinitely until the system is resumed by, for example, turning the power switch on, pressing keyboard, or the like. If the system awakes from the suspend mode, a resume mode is entered. In the resume mode, the computer system retrieves the saved contents from the non-volatile storage in order to go back into the previous state that it was in before it entered the suspend mode. This power management scheme is most useful for portable computers using battery power in order to conserve power and prolong the life of the battery.
Typically, when a computer system using an advanced power is booted, either a resume boot process or a BIOS boot process is performed depending upon whether the system is in a resume mode. If the BIOS boot process is performed, an operating system is loaded and executed. After the operating system is executed or after the resume boot process is performed, the system enters a normal mode of operation.
For many PC systems using PnP incompatible operating systems (e.g., MS-DOS.RTM. and OS/2.RTM.) which do not support the PnP automatic configuration mechanism, the system BIOS may directly save and restore the PnP card information during suspend and resume modes. However, unlike PC systems using PnP incompatible operating systems, PC systems having PnP compatible operating system (e.g., WINDOWS 95.RTM., or the like) and PnP ISA device cards, and employing such a power management scheme experience significant problems when the PC system enters into a suspend mode. The configuration of PnP ISA device cards is cleared when the PC system is powered off in a suspend mode. During a resume mode, the information of each PnP ISA device card needs restoring when the corresponding device driver receives the resume message from the BIOS through the operating system. However, most of the device drivers do not support this function. Further, in such a PnP compatible PC system, the system BIOS cannot find the address of the READ.sub.-- DATA port since the PnP compatible operating system (specifically, WINDOWS 95.RTM.) directly configures the READ.sub.-- DATA port of PnP ISA cards and does not re-configure the PnP cards. Thus, it is impossible for the system BIOS to save/restore the PnP ISA card information when the PC system is entering the suspend/resume mode, thereby disabling the PnP ISA cards after the system resume.